 $Id: PKGBUILD,v 1.10 2008/05/13 19:03:39 ronald Exp $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Angelo Theodorou <encelo@users.sourceforge.net>
# Contributor: Vinay S Shastry <vinayshastry@gmail.com>

pkgname=wxmaxima
pkgver=17.05.1
pkgrel=1
pkgdesc="A wxWidgets GUI for the computer algebra system Maxima"
arch=('i686' 'x86_64')
url="http://andrejv.github.io/wxmaxima/index.html"
license=('GPL2')
depends=('maxima' 'libxml2' 'wxgtk3')
makedepends=('cmake')
source=($pkgname-$pkgver.tar.gz::"https://github.com/andrejv/wxmaxima/archive/Version-$pkgver.tar.gz")
sha1sums=('a8fb2fac114eb40f7ed7022a988e5c73dac2ec80')

build() {
  cd ${pkgname}-Version-${pkgver}
  cmake . \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-gtk3
  make
}

#check() {
#  cd ${pkgname}-Version-${pkgver}
#  ./src/wxmaxima test/testbench_simple.wxmx
#}

package() {
  cd ${pkgname}-Version-${pkgver}

  make DESTDIR="${pkgdir}" install 

  # Fix category in .desktop file
  sed -i '/Categories=/c\Categories=Science;Math;' data/wxMaxima.desktop
}
